package kr.co.redbean.controls
{
	import flash.events.MouseEvent;
	
	import kr.co.redbean.events.MenuEvent;

	public class CartButton extends MenuButton
	{
		public function CartButton(isIcon:Boolean=false)
		{
			var _text:String;
			
			if(isIcon === false) {
				_text = '0 items in shopping bag';
			} else {
				_text = '';
			}
	
			super(_text);
			
			if(isIcon === false) {
				menuColor = 0x555555;
				textFormat.size = 12;
				textFormat.align = 'right';
				textFormat.letterSpacing = -0.5;
				
				setFormat();
			}
		}
		
		override internal function MENU_CLICK($e:MouseEvent):void { 
			stage.dispatchEvent(new MenuEvent(MenuEvent.MENU_CLICK, 'shoppingbag'));
		}
	}
}